<template>
    <div>
        <h2>显示列表</h2>
        <table class="table table-bordered">
            <body>
                <tr class="bg-primary">
                    <td>姓名</td>
                    <td>性别</td>
                    <td>手机号</td>
                    <td>地址</td>
                </tr>
                <tr v-for="item in workshow">
                    <td>{{item.name}}</td>
                    <td>{{item.sex}}</td>
                    <td>{{item.phone}}</td>
                    <td>{{item.adder}}</td>
                </tr>
            </body>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ref,reactive,onMounted } from 'vue';

import "bootstrap/dist/css/bootstrap.min.css"
import axios from 'axios';
import { useRoute } from 'vue-router';

const router=useRoute();
const workshow=ref([])
const getworkshow=()=>{
    axios.get("https://localhost:7237/api/User/GetUsers").then(res=>{
        workshow.value=res.data;
    })
}
onMounted(()=>{
    getworkshow();
})

</script>


<style scoped>

</style>